#include "mainwindow.h"
#include"denglu.h"
#include <QApplication>
#include"sql.h"
#include<QDebug>
#include<QString>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // 初始化数据库连接
      SqlController *sqlController = SqlController::getInstance();
      if (sqlController->initDataBase()) {
          qDebug() << "链接成功";
      }
     //创建用户表
      const QString CREATE_USER_TABLE_SQL =
              "CREATE TABLE IF NOT EXISTS UserInfo ("
              "id INT PRIMARY KEY AUTO_INCREMENT,"
              "name VARCHAR(255) NOT NULL,"
              "password VARCHAR(255) NOT NULL,"
              "email VARCHAR(255) NOT NULL,"
              "auth INT NOT NULL"
              ");";
      DengLu w;
      w.show();
      return a.exec();
  }
